
package com.joysuch.wwyt.datadump.biz.convertor;

import cn.zlg.common.datadump.annotation.DataDumpField;
import cn.zlg.common.datadump.convertor.FieldValueConvert;
import com.joysuch.wwyt.common.repository.CommonTypeDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 试题类型
 */
@Component
public class ExportQuestionTypeIdConvertor implements FieldValueConvert<Long, String> {
    @Autowired
    private CommonTypeDao commonTypeDao;
    @Override
    public String convert(Object bean, Long value, DataDumpField dataField) {
        return commonTypeDao.getNameById(value);
    }

}
